/**
 * Created with CLion.
 * Description: 检查更新：比较远程配置文件中的版本号，进行验证
 * User: loong
 * Date: 2020-12-13
 * Time: 14:28
 */
#ifndef AUTOUPDATE_UPDATEMANAGER_H
#define AUTOUPDATE_UPDATEMANAGER_H

#include <QWidget>
#include <QDebug>
#include <QDir>
#include "IProtocal.h"
#include "FtpManager.h"
#include "ReadConfig.h"

class UpdateManager
        : public QObject
{
Q_OBJECT

public:
    explicit UpdateManager();

    ~UpdateManager() override = default;

    void CheckUpdate();

    void SetSaveDir();
private:
    void InitEvent();
signals:
    void EmitHaveUpdate(bool _have);

private:
    FtpManager *            ftp_protocal_;
    ReadConfig *            read_config_;
    QDir                    save_dir_;
};

#endif //AUTOUPDATE_UPDATEMANAGER_H
